package com.foreveross.proxyip.core.pools.thread.publ;

import com.foreveross.proxyip.core.BaseCode;
import com.foreveross.proxyip.core.pools.PublicPool;
import com.foreveross.proxyip.core.pools.thread.AbsCheckOutThread;
import com.foreveross.proxyip.infra.base.ddd.repository.IBaseRepository;
/**
 * 验证公共池检出线程
 * @author lyq
 *
 */
public class PublicCheckOutThread extends AbsCheckOutThread {
	public long preValidateTime = 0;//上次检出时间
	
//	public Integer poolSeparationTime = 0;
	
	public PublicCheckOutThread(PublicPool publicPool,
			IBaseRepository repository) throws Exception {
		super(publicPool , CheckType.CHECKOUT);
//		super.setIsInit(false);
		super.separationTime = Integer.parseInt(BaseCode.getValue("PUBLIC_OUT_SEPARATION_TIME"));
	}

//	@Override
//	public void publishTask() throws Exception {
//		ZkPlan plan = new ZkPlan(this.pool.poolSign, "CheckOutTask", this.pool.size(),ZkAppCenter.getInstance());
//		plan.execute();
//	}

	@Override
	public boolean needSleep() throws Exception {
		//这个不需要睡眠
		return false;
	}

}
